#pragma once
#include <WinSock2.h>

class TTTUDPSocket
{
public:
	TTTUDPSocket();
	virtual ~TTTUDPSocket(void);
	operator SOCKET	()	{return m_Socket;}
	BOOL SendData(BYTE *pData, DWORD dwLen);
	BOOL SendTo(LPCTSTR pszRemoteAddress, USHORT usPortt, BYTE *pData, DWORD dwLen);
	BOOL InitSocket(LPCTSTR pszRemoteAddress, USHORT usPortt, BOOL bSrv);
	DWORD RecvData(BYTE *pData, DWORD dwMaxLen);
private:
	SOCKET m_Socket;
	SOCKADDR_IN m_Sockaddr;
};

